﻿using System;
using System.Collections.Generic;
using System.Text;

namespace OgilvyOne.UKNow.Globalization
{
    public class LanguageFactory
    {
        public static readonly ILanguage ChineseLanguage = new ChineseLanguage();
        public static readonly ILanguage EnglishLanguage = new EnglishLanguage();

        public static ILanguage Create(LanguageType langType)
        {
            ILanguage lang = null;

            switch(langType)
            {
                case LanguageType.cn:
                    lang = ChineseLanguage;
                    break;
                case LanguageType.en:
                    lang = EnglishLanguage;
                    break;
            }

            return lang;
        }

        public static ILanguage Create(int languageID)
        {
            ILanguage lang = null;

            switch (languageID)
            {
                case (int)LanguageType.cn:
                    lang = ChineseLanguage;
                    break;
                case (int)LanguageType.en:
                    lang = EnglishLanguage;
                    break;
            }

            return lang;
        }
    }
}
